/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package intershopxssscanner.filters;

import java.util.ArrayList;
import java.util.Properties;

/**
 *
 * @author Willem
 */
public class TrimFilter extends FilterAdapter{

    public String doFilterLine(String input) {
        return input.trim();
    }

    @Override
    public void loadSettings(Properties prop, String id) {
        
    }

    @Override
    public ArrayList<String> doFilter(ArrayList<String> input) {
        ArrayList<String> output = new ArrayList<String>();

        for (String line : input) {
            line = doFilterLine(line);

            if (line == null) {
                break;
            }
            else{
                output.add(line);
            }
        }

        return output;
    }
    
}
